home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Security / Keepass 2.04 / KeePass-2.04-Alpha-Setup.exe / {app} / XSL / KDB4_Tabular.xsl < prev    next >
Extensible Markup Language  |  2006-08-19  |  3KB  |  78 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4. <xsl:template match="/">
  5. <xsl:apply-templates select="KeePassFile" />
  6. </xsl:template>
  7.  
  8. <xsl:template match="KeePassFile">
  9. <html>
  10. <head>
  11. <xsl:apply-templates select="Meta" />
  12. <link rel="stylesheet" type="text/css" href="KDB4_Styles.css" />
  13. </head>
  14. <body>
  15. <xsl:apply-templates select="Root" />
  16. </body>
  17. </html>
  18. </xsl:template>
  19.  
  20. <xsl:template match="Meta">
  21. <title><xsl:value-of select="DatabaseName" /></title>
  22. </xsl:template>
  23.  
  24. <xsl:template match="Root">
  25. <table class="tablebox">
  26. <tr>
  27. <td class="smallboxtitle" width="20%" nowrap="nowrap" align="center"><b><i>Title</i></b></td>
  28. <td class="smallboxtitle" width="20%" nowrap="nowrap" align="center"><b><i>User Name</i></b></td>
  29. <td class="smallboxtitle" width="20%" nowrap="nowrap" align="center"><b><i>Password</i></b></td>
  30. <td class="smallboxtitle" width="20%" nowrap="nowrap" align="center"><b><i>URL</i></b></td>
  31. <td class="smallboxtitle" width="20%" nowrap="nowrap" align="center"><b><i>Notes</i></b></td>
  32. </tr>
  33. <xsl:for-each select="Group">
  34. <xsl:apply-templates select="." />
  35. </xsl:for-each>
  36. </table>
  37. </xsl:template>
  38.  
  39. <xsl:template match="Group">
  40. <tr>
  41. <td class="boxcontent"><big><b><xsl:value-of select="Name" /></b></big></td>
  42. <td class="boxcontent"> </td>
  43. <td class="boxcontent"> </td>
  44. <td class="boxcontent"> </td>
  45. <td class="boxcontent"> </td>
  46. </tr>
  47.  
  48. <xsl:for-each select="Entry">
  49. <xsl:apply-templates select="." />
  50. </xsl:for-each>
  51.  
  52. <xsl:for-each select="Group">
  53. <xsl:apply-templates select="." />
  54. </xsl:for-each>
  55.  
  56. </xsl:template>
  57.  
  58. <xsl:template match="Entry">
  59. <tr>
  60. <td class="boxcontent"><xsl:for-each select="String[Key='Title']"><xsl:value-of select="Value" /></xsl:for-each></td>
  61. <td class="boxcontent"><xsl:for-each select="String[Key='UserName']"><xsl:value-of select="Value" /></xsl:for-each></td>
  62. <td class="boxcontent"><xsl:for-each select="String[Key='Password']"><xsl:value-of select="Value" /></xsl:for-each></td>
  63.  
  64. <td class="boxcontent">
  65. <xsl:element name= "a">
  66. <xsl:attribute name="href">
  67. <xsl:for-each select="String[Key='URL']"><xsl:value-of select="Value" /></xsl:for-each>
  68. </xsl:attribute>
  69. <xsl:for-each select="String[Key='URL']"><xsl:value-of select="Value" /></xsl:for-each>
  70. </xsl:element>
  71. </td>
  72.  
  73. <td class="boxcontent"><xsl:for-each select="String[Key='Notes']"><xsl:value-of select="Value" /></xsl:for-each></td>
  74. </tr>
  75. </xsl:template>
  76.  
  77. </xsl:stylesheet>
  78.